<template>
  <div class="rel">
    <div v-if="modalType == 2" class="abs trbl0 zx10"></div> <!--列表中预览的话，就不需要可以输入，只需要看看-->
    <div v-for="(item, index) in operateForm" :key="item.id"> 
      <div :class="['rel rds3 pl30 pr30']">
        <CusSplit v-if="item.type == 'split'" :item="item" @setItem="e=>item=e" :formData="operateForm" @setFormData="e => $emit('setOperateForm', e)" :modalType="modalType"></CusSplit>
        <CusText v-if="item.type == 'text'" :item="item" @setItem="e=>item=e" :formData="operateForm" @setFormData="e => $emit('setOperateForm', e)" :modalType="modalType"></CusText>
        <CusDivide v-if="item.type == 'divide'" :item="item" @setItem="e=>item=e" :formData="operateForm" @setFormData="e => $emit('setOperateForm', e)" :modalType="modalType"></CusDivide>
        <CusInput v-if="item.type == 'input'" :item="item" @setItem="e=>item=e" :formData="operateForm" @setFormData="e => $emit('setOperateForm', e)" :modalType="modalType"></CusInput>
        <CusTextAreaPrint v-if="item.type == 'textarea' && modalType == 1" :item="item" @setItem="e=>item=e" :formData="operateForm" @setFormData="e => $emit('setOperateForm', e)"></CusTextAreaPrint>
        <CusTextArea v-else-if="item.type == 'textarea'" :item="item" @setItem="e=>item=e" :formData="operateForm" @setFormData="e => $emit('setOperateForm', e)" :modalType="modalType"></CusTextArea>
        <CusRadio v-if="item.type == 'radio'" :item="item" @setItem="e=>item=e" :formData="operateForm" @setFormData="e => $emit('setOperateForm', e)"></CusRadio>
        <CusCheckBox v-if="item.type == 'checkbox'" :item="item" @setItem="e=>item=e" :formData="operateForm" @setFormData="e => $emit('setOperateForm', e)"></CusCheckBox>
        <CusSelect v-if="item.type == 'select'" :item="item" @setItem="e=>item=e" :formData="operateForm" @setFormData="e => $emit('setOperateForm', e)" :modalType="modalType"></CusSelect>
        <CusDate v-if="item.type == 'date'" :item="item" @setItem="e=>item=e" :formData="operateForm" @setFormData="e => $emit('setOperateForm', e)" :modalType="modalType"></CusDate>
        <CusUploadFile v-if="item.type == 'uploadFile'" :item="item" @setItem="e=>item=e" :formData="operateForm" @setFormData="e => $emit('setOperateForm', e)" :modalType="modalType"></CusUploadFile>
        <CusUploadImg v-if="item.type == 'uploadImg'" :item="item" @setItem="e=>item=e" :formData="operateForm" @setFormData="e => $emit('setOperateForm', e)"></CusUploadImg>
        <CusBloodPressure v-if="item.type == 'bloodPressure'" :item="item" @setItem="e=>item=e" :formData="operateForm" @setFormData="e => $emit('setOperateForm', e)" :modalType="modalType"></CusBloodPressure>
        <CusPulseDorsalis v-if="item.type == 'pulseDorsalis'" :item="item" @setItem="e=>item=e" :formData="operateForm" @setFormData="e => $emit('setOperateForm', e)" :modalType="modalType"></CusPulseDorsalis>
        <CusCurrentAndTarget v-if="item.type == 'currentAndTarget'" :item="item" @setItem="e=>item=e" :formData="operateForm" @setFormData="e => $emit('setOperateForm', e)" :modalType="modalType"></CusCurrentAndTarget>
        <CusMedicinePrint v-if="item.type == 'medicine' && modalType == 1" :item="item" @setItem="e=>item=e" :formData="operateForm" @setFormData="e => $emit('setOperateForm', e)"></CusMedicinePrint>
        <CusMedicine v-else-if="item.type == 'medicine'" :item="item" @setItem="e=>item=e" :formData="operateForm" @setFormData="e => $emit('setOperateForm', e)"></CusMedicine>
        <CusSymptom v-if="item.type == 'symptom'" :item="item" @setItem="e=>item=e" :formData="operateForm" @setFormData="e => $emit('setOperateForm', e)"></CusSymptom>
      </div>
    </div>
  </div>
</template>
<script src='./index.js'></script>
<style src='./index.css' scoped></style>